package com.it.myh;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @Description: // 类说明，在创建类时要填写
 * @ClassName: Ev_0608_01    // 类名，会自动填充
 * @Author: MYH          // 创建者
 * @Date: 2023/6/8 8:29   // 时间
 * @Version: 1.0     // 版本
 */
public class Ev_0608_01 {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        Collections.addAll(list,"张无忌-男-15","周正若女-15","赵敏-女-15","谢广坤-男-15");
        List<String> collect = list.stream()
                .filter(s -> s.split("-")[1].equals("男"))
                .collect(Collectors.toList());
        for (String s : collect) {
            System.out.println(s);
        }
    }
}
